<template>
	<view class="szBody">
		<view>
			<navitop>
				<i class="iconfont" slot="left-slot" @click="outlot">&#xe667;</i>
				<span slot="center-slot">个人信息</span>
				<!-- <span slot="right-slot">123</span> -->
			</navitop>
		</view>
		<div :style="'padding-top:' + nv_height + ';'">
			<div class="Bodu_class" v-for="(item,index) in List">
				<div class="Bodu_class_text" @click="email_class(index)">
					<text>
						{{item.email}}
					</text>
					<!-- <image src="../../static/image/1.jpg"></image> -->
				</div>
			</div>
		</div>

	</view>
</template>

<script>
	import navitop from '@/components/common/navi-top'
	import {
		logout
	} from '@/common/api/table.js'
	export default {
		components: {
			navitop,
		},
		data() {
			return {
				userInfo: [],
				selid: '',
				alertWidth: '',
				nv_height: '',
				List: [{
						email: '账户信息',
						icons: 'icon-changyongtubiao-xianxingdaochu-zhuanqu-'
					},
					{
						email: '修改密码',
						icons: 'icon-bianji'
					},
					{
						email: '版本更新',
						icons: 'icon-changyongtubiao-xianxingdaochu-zhuanqu-'
					}
				]
			}
		},
		onShow() {
			this.userInfo.push(uni.getStorageSync('userInfo'));
			for (let i in this.List) {
				this.List[i].name = this.userInfo[0].realName
			}
		},
		filters: {
			sexType(sex) {
				if (sex == 1) {
					return `男`;
				} else if (sex == 0) {
					return `女`;
				} else {
					return `未知`;
				}
			}
		},
		mounted() {
			this.nv_height = uni.getSystemInfoSync().statusBarHeight + 65 + 'px';
		},
		methods: {
			go_details() {
				uni.navigateTo({
					url: 'user-xg'
				})
			},

			alert() {
				this.$refs.alert.open('left')
			},

			outlot() {
				uni.navigateTo({
					url: '/pages/my/subpage/set_list'
				})
				// uni.switchTab({
				// 	url: '/pages/my/my'
				// });
			},
			runIndex(val) {
				uni.navigateTo({
					url: '/pages/common/my/my-details?id=' + val + '&name=' + 123
				})
			},
			
			email_class(val) {
					if (val == 0) {
						uni.navigateTo({
							url: '/pages/common/my/my-details'
						})
					}
					if (val == 1) {
						uni.navigateTo({
							url: '/components/user-sz/user-xgPassword'
						})
					}
			}

	}
}
</script>

<style scoped lang="scss">
	@import "@/static/css/user/index.scss";

	.public_top {
		padding-top: 80px;
	}

	.Bodu_class {
		width: 100%;
		height: 100%;

		.Bodu_class_text {
			background-color: #fff;
			width: 95%;
			margin: auto;
			height: 90rpx;
			line-height: 90rpx;
			border-radius: 4px;

			text {
				padding: 0 0 0 30rpx;
			}
		}
	}
</style>
